The storm will pass, humankind will survive, most of us will still be alive — but we will inhabit a different world. 폭풍은 지나갈 것이고 인류는 살아남을 것이다. 그러나 우리는 전혀 다른 세상에서 살아갈 것이다.
유발하라리: Yuval Noah Harari (MARCH 20 2020), “the world after coronavirus”, the Financial Times.
As Covid-19 impacts every aspect of our work and life, we have seen two years’ worth of digital transformation in two months. 코로나19가 모든 영역에서 영향을 미침으로 인해, 2년이 걸릴 디지털 대전환이 지난 2개월 만에 이뤄졌다.
사티아 나델라: Satya Nadella 마이크로소프트 CEO
정부혁신1번가 웹사이트에서 HOME > 디지털 정부혁신 > 디지털정부혁신자료실 에서 한국판 뉴딜 및 디지털 뉴딜 계획자료 보고서를 만날 수 있다.
library(tidyverse)
library(slickR)
library(pdftools)
ND_pdf <- pdf_convert("data/200715_digital_new_deal_report.pdf",format = 'png',verbose = FALSE)
ND_detail_pdf <- pdf_convert("data/200714_digital_new_deal_report_deail.pdf",format = 'png',verbose = FALSE)# ND_pdf %>% write_rds("data/ND_pdf.rds")
ND_pdf <- read_rds("data/ND_pdf.rds")
ND_pdf_df <- tibble(page = glue::glue("fig/{ND_pdf}") )
slickR(ND_pdf_df$page, height = 600)# ND_detail_pdf %>% write_rds("data/ND_detail_pdf")
ND_detail_pdf <- read_rds("data/ND_detail_pdf")
ND_detail_pdf_df <- tibble(page = glue::glue("fig/{ND_detail_pdf}") )
slickR(ND_detail_pdf_df$page, height = 600)기획재정부 한국판 뉴딜 웹사이트에 확고한 사람중심 포용국가 기반 위에 디지털(digital) 뉴딜과 그린(green) 뉴딜 두 개의 축으로 추진하며, 2025년까지 총160조원(국비 114.1조원)을 투입하고 총190.1만개 일자리를 창출하겠다는 내용이 정리되어 있다.
library(collapsibleTree)
library(tidyverse)
library(readxl)
한국판뉴딜 <- read_excel("data/한국판뉴딜.xlsx")
collapsibleTree(한국판뉴딜,
hierarchy = c("레벨1", "레벨2", "레벨3"),
tooltip = TRUE,
attributes = "레벨1")library(magick)
jobs_img <- image_read("fig/new-deal-investment-jobs.jpg")
jobs_img먼저 데이터를 이미지에서 OCR할 수 있는지 살펴보자.
library(tesseract)
library(image.binarization)
only_numbers <- tesseract(options = list(tessedit_char_whitelist = ".0123456789"))
jobs_img %>%
image_crop("400x965+520+100")jobs_img %>%
image_crop("400x650+500+100") %>%
tesseract::ocr(engine = only_numbers)[1] "18644890.3\n125319567\n3164295\n65148172\n259791\n041009\n060809\n030304\n030505\n2113.4\n0.2 0405\n0.6 0709\n03 1.0 12.0\n44100193\n3785124\n061214\n010355\n196427659\n61121387\n2662243\n120025105\n233439\n103243209\n2020\n3692038\n561151\n326363\n2036047\n122716\n"
## '20추 ~ '22추
field_01 <- jobs_img %>%
image_crop("50x650+520+100") %>%
# image_convert(format = "PGM", colorspace = "Gray") %>%
# image_binarization(type = "otsu") %>%
tesseract::ocr(engine = only_numbers)
field_01_df <- field_01 %>%
str_split(pattern = "\n") %>%
as.data.frame() %>%
set_names("20-22") %>%
as_tibble()
field_01_df# A tibble: 29 x 1
`20-22`
<chr>
1 18.6
2 12.5
3 31
4 65
5 25
6 0.4
7 06
8 03
9 03
10 11
# ... with 19 more rows
## '20추 ~ '25추
field_02 <- jobs_img %>%
image_crop("50x650+580+100") %>%
# image_convert(format = "PGM", colorspace = "Gray") %>%
# image_binarization(type = "otsu") %>%
tesseract::ocr(engine = only_numbers)
field_02_df <- field_02 %>%
str_split(pattern = "\n") %>%
as.data.frame() %>%
set_names("20-25") %>%
as_tibble() %>%
filter(`20-25` != "")
## 일자리
field_03 <- jobs_img %>%
image_crop("50x650+650+100") %>%
# image_convert(format = "PGM", colorspace = "Gray") %>%
# image_binarization(type = "otsu") %>%
tesseract::ocr(engine = only_numbers)
field_03_df <- field_03 %>%
str_split(pattern = "\n") %>%
as.data.frame() %>%
set_names("일자리") %>%
as_tibble()
## 분야
sub_names <- tribble(~"subnames",
"합계",
"소계",
"", "", "", "",
"소계",
"", "",
"소계",
"", "", "",
"소계",
"", "", "",
"합계",
"소계",
"", "", "",
"소계",
"", "", "",
"소계",
"", "")
ocred_df <- bind_cols(sub_names) %>%
bind_cols(field_01_df) %>%
bind_cols(field_02_df) %>%
bind_cols(field_03_df) %>%
filter(subnames =="") %>%
bind_cols(한국판뉴딜 %>% filter(`레벨1` %in% c("디지털뉴딜", "그린뉴딜"))) %>%
select(레벨0, 레벨1, 레벨2, 레벨3, `20-22`, `20-25`, 일자리)
ocred_df# A tibble: 20 x 7
레벨0 레벨1 레벨2 레벨3 `20-22` `20-25` 일자리
<chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 한국판 뉴딜~ 디지털뉴딜~ D.N.A. 생태계 강화~ 국민생활과 밀접한 분야 데이터 구축ㆍ~ "31" 64 "295"
2 한국판 뉴딜~ 디지털뉴딜~ D.N.A. 생태계 강화~ 1ㆍ2ㆍ3차 전(全)산업으로 5GㆍA~ "65" 148 "172"
3 한국판 뉴딜~ 디지털뉴딜~ D.N.A. 생태계 강화~ 5GㆍAI 기반 지능형 정부~ "25" 97 "91"
4 한국판 뉴딜~ 디지털뉴딜~ D.N.A. 생태계 강화~ K-사이버 방역체계 구축~ "0.4" 1.0 "09"
5 한국판 뉴딜~ 디지털뉴딜~ 교육 인프라 디지털 전환~ 모든 초중고에 디지털 기반 교육 인프~ "03" 03 "04"
6 한국판 뉴딜~ 디지털뉴딜~ 교육 인프라 디지털 전환~ 전국 대학ㆍ직업훈련기관 온라인 교육 ~ "03" 05 "13.4"
7 한국판 뉴딜~ 디지털뉴딜~ 비대면 산업 육성~ 스마트 의료 및 돌봄 인프라 구축~ "0.2" 04 "09"
8 한국판 뉴딜~ 디지털뉴딜~ 비대면 산업 육성~ 중소기업 원격근무 확산~ "0.6" 07 "120"
9 한국판 뉴딜~ 디지털뉴딜~ 비대면 산업 육성~ 소상공인 온라인 비즈니스 지원~ "03" 1.0 "19.3"
10 한국판 뉴딜~ 디지털뉴딜~ SOC 디지털화 4대 분야 핵심 인프라 디지털 관리체~ "37" 85 "14"
11 한국판 뉴딜~ 디지털뉴딜~ SOC 디지털화 도시ㆍ산단의 공간 디지털 혁신~ "0.6" 12 "55"
12 한국판 뉴딜~ 디지털뉴딜~ SOC 디지털화 스마트 물류체계 구축 "1" 03 "65.9"
13 한국판 뉴딜~ 그린뉴딜~ 도시ㆍ공간ㆍ생활 인프라 녹~ 국민생활과 밀접한 공공시설 제로에너지~ "26" 62 "105"
14 한국판 뉴딜~ 그린뉴딜~ 도시ㆍ공간ㆍ생활 인프라 녹~ 국토ㆍ해양ㆍ도시의 녹색 생태계 회복~ "12" 25 "39"
15 한국판 뉴딜~ 그린뉴딜~ 도시ㆍ공간ㆍ생활 인프라 녹~ 깨끗하고 안전한 물 관리체계 구축~ "23" 34 "20.9"
16 한국판 뉴딜~ 그린뉴딜~ 저탄소<U+2027>분산형 에너지 확산~ 에너지관리 효율화 지능형 스마트 그리~ "36" 20 "38"
17 한국판 뉴딜~ 그린뉴딜~ 저탄소<U+2027>분산형 에너지 확산~ 신재생에너지 확산기반 구축 및 공정한~ "56" 92 "151"
18 한국판 뉴딜~ 그린뉴딜~ 저탄소<U+2027>분산형 에너지 확산~ 전기차ㆍ수소차 등 그린 모빌리티 보급~ "3.2" 31 "63"
19 한국판 뉴딜~ 그린뉴딜~ 녹색산업혁신 생태계구축~ 녹색 선도 유망기업 육성 및 저탄소ㆍ~ "12" 36 "16"
20 한국판 뉴딜~ 그린뉴딜~ 녹색산업혁신 생태계구축~ R&Dㆍ금융 등 녹색혁신 기반 조성~ "" 27 ""
library(data.tree)
finance_df <- read_excel("data/한국판뉴딜.xlsx", sheet="finance")
finance_df$pathString <- paste(finance_df$레벨0,
finance_df$레벨1,
finance_df$레벨2,
finance_df$레벨3,
sep = "/")
nd_finance <- as.Node(finance_df)
nd_finance$Do(function(node) node$재원 <- data.tree::Aggregate(node, attribute = "재원", aggFun = sum))
collapsibleTree(nd_finance,
zoomable = FALSE,
collapsed = TRUE,
nodeSize = "재원", attribute = "재원", tooltip = TRUE)[1] "Node$fields will be deprecated in the next release. Please use Node$attributes instead."
[1] "Node$fields will be deprecated in the next release. Please use Node$attributes instead."
nd_finance$Do(function(node) node$일자리 <- data.tree::Aggregate(node, attribute = "일자리", aggFun = sum))
collapsibleTree(nd_finance,
zoomable = FALSE,
collapsed = TRUE,
nodeSize = "일자리",
attribute = "일자리", tooltip = TRUE)[1] "Node$fields will be deprecated in the next release. Please use Node$attributes instead."
[1] "Node$fields will be deprecated in the next release. Please use Node$attributes instead."
2025년까지 총160조원(국비 114.1조원)을 투입하여 총190.1만개 일자리를 창출하기로 되어있는데 투자재원별로 일자리 창출관계를 시각화하여 살펴보자.
library(ggrepel)
library(extrafont)
loadfonts()
fin_job_df <- read_excel("data/한국판뉴딜.xlsx", sheet="EDA")
fin_job_df %>%
ggplot(aes(x=재원, y=일자리, color = 레벨1, label=str_trunc(레벨3, 20))) +
geom_point() +
geom_smooth(method = "lm", se=FALSE) +
geom_text_repel(hjust=-.1, check_overlap=TRUE) +
theme_bw(base_family = "NanumGothic") +
theme(legend.position = "top") +
labs(color="뉴딜 3대축", x="투자재원 (단위:조)", y="일자리 (단위:만)",
title = "한국판 뉴딜 주요추진과제별 투자재원과 일자리")fin_job_df %>%
group_by(레벨2) %>%
summarise(투자재원 = sum(재원),
일자리 = sum(일자리)) %>%
pivot_longer(cols=투자재원:일자리, names_to="구분") %>%
mutate(구분 = factor(구분, levels=c("투자재원", "일자리"))) %>%
ggplot(aes(x=fct_reorder(레벨2, value), y=value, fill=구분)) +
geom_col(show.legend = FALSE) +
facet_wrap(~구분) +
coord_flip() +
theme_bw(base_family = "NanumGothic") +
labs(x="", y="투자재원(단위:조원), 일자리(단위:만명)")‘데이터 댐’ 일자리 39만 개…직접 체험해 보니 / KBS뉴스(News)
데이터 과학자 이광춘 저작
kwangchun.lee.7@gmail.com